<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title>黔南民族师范学院综合教育学分认定系统</title>

	<link rel="stylesheet" href="/jquery-easyui-1.3.5/themes/icon.css" />
	<link rel="stylesheet" href="/jquery-easyui-1.3.5/themes/default/easyui.css"/>

	<script type="text/javascript" src="/jquery-easyui-1.3.5/jquery.min.js"></script>
	<script type="text/javascript" src="/jquery-easyui-1.3.5/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="/jquery-easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
	<style type="text/css">
		form div{
			margin:20px auto;
			text-align:center;
		}
	</style>
	<script type="text/javascript"  th:inline="none">
    	$(function(){
    		$("input[name=name]").validatebox({
    			required:true,
    			missingMessage:'请输入学院名称'
    		});
    		$("input[name=address]").validatebox({
    			required:true,
    			missingMessage:'请输入学院地址'
    		});
    		$("#ff").form("disableValidation");
    		
    		$("#btn").click(function(){
    			$("#ff").form("enableValidation");
    			if($("#ff").form("validate")){
    				$("#ff").form('submit',{
    					url:'/school/schoolSave',
    					success:function(){
    						parent.$("#win").window("close");
    						parent.$("iframe[title='学院信息管理']").get(0).contentWindow.$("#dg").datagrid("reload");
    						}
    					}
    				);
    			}
    		});
    	});
    	
    	
    	
    </script>
  </head>
  
  <body>
  	<form id="ff" method="post">   
	    <div>   
	        <label for="name">学院名称:</label>   
	        <input type="text" name="name" />   
	    </div>   
	    <div>   
	        <label for="address">学院地址:</label>   
	        <input type="text" name="address" />   
	    </div> 
	    <div>
	    	<a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-add'">添加学院</a>  
	    </div>     
	</form>  
  </body>
</html>
